package com.qihetimes.earthangel.config;

import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.teaopenapi.models.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 短信客户端配置
 *
 * @author ：f4cklangzi@gmail.com
 * @date ：Created At 2021/12/9
 */
@Configuration
public class SmsClientConfig {
    
    @Bean
    public Client config() throws Exception {
        Config config = new Config()
            .setAccessKeyId("LTAI5tSW9ZNB3yC3CLxwpDZt")
            .setAccessKeySecret("Dsf7FV7n6N3zFs61SnaiDLZR5F5rEM");
        config.endpoint = "dysmsapi.aliyuncs.com";
        return new Client(config);
    }
}
